package com.mxpio.erp.common.equipment.service;

import com.mxpio.erp.common.equipment.entity.EquipmentStockCkApplyItem;
import com.mxpio.erp.common.equipment.vo.VEquipmentStockInventory;
import com.mxpioframework.system.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Description: tpm_stock_ck_apply_item
 * @Author: jeecg-boot
 * @Date:   2021-10-14
 * @Version: V1.0
 */
public interface EquipmentStockCkApplyItemService extends BaseService<EquipmentStockCkApplyItem> {

	public List<EquipmentStockCkApplyItem> selectByMainId(String mainId);

	/**
	 * 根据主键查询详情Page
	 */
	public Page<EquipmentStockCkApplyItem> queryByMainId(Pageable page, String mainId);

	/**
	 * 保存详情
	 */
	boolean saveItem(EquipmentStockCkApplyItem tpmStockckApplyItem);
	/**
	 * 根据ID更新详情
	 */
	boolean updateItemById(EquipmentStockCkApplyItem tpmStockckApplyItem);

	/**
	 * 根据主键查询详情Page，库存和历史记录的已出库数量
	 */
	public Page<EquipmentStockCkApplyItem> queryCkPostingByMainId(Pageable page, String mainId);

	/**
	 * 根据物料查询库存
	 * @param page
	 * @param materialsId
	 * @return
	 */
	public Page<VEquipmentStockInventory> queryPageListInventory(Pageable page, String materialsId);
}
